<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  	<meta name="apple-mobile-web-app-capable" content="yes">
  	<meta name="apple-mobile-web-app-status-bar-style" content="black">
  	<meta name="format-detection" content="telephone=no">
	<title></title>
	<link rel="stylesheet" href="css/base.css">
	<link rel="stylesheet" href="css/soHead.css">
	<link rel="stylesheet" href="css/result.css">
	<link rel="stylesheet" href="css/mobiscroll.custom-2.5.0.min.css"/>

    <link rel="stylesheet" href="jqueryui/css/jquery.ui.all.css">
    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="jqueryui/js/jquery.ui.core.js"></script>
    <script src="jqueryui/js/jquery.ui.widget.js"></script>
    <script src="js/mobiscroll.custom-2.5.0.min.js"></script>
    <script>
	    function selectBegin(valueText,inst){
	    	$("#sstart").html(valueText);
	    }
	    function selectEnd(valueText,inst){
	    	$("#send").html(valueText);
	    }
        $(function() {
			$("#timeBegin").mobiscroll().date();
			$("#timeEnd").mobiscroll().date();
			
			var currYear = (new Date()).getFullYear();  
            
			
			//初始化日期控件
			var opt = {
				preset: 'date', //日期，可选：date\datetime\time\tree_list\image_text\select
				theme: 'android-ics light', //皮肤样式，可选：default\android\android-ics light\android-ics\ios\jqm\sense-ui\wp light\wp
				display: 'modal', //显示方式 ，可选：modal\inline\bubble\top\bottom
				mode: 'scroller', //日期选择模式，可选：scroller\clickpick\mixed
				lang:'zh',
				dateFormat: 'yyyy-mm-dd', // 日期格式
				setText: '确定', //确认按钮名称
				cancelText: '取消',//取消按钮名籍我
				dateOrder: 'yyyymmdd', //面板中日期排列格式
				dayText: '日', monthText: '月', yearText: '年', //面板中年月日文字
				showNow: false,  
           		nowText: "今",  
            	startYear:currYear-20, //开始年份  
            	endYear:currYear + 100 //结束年份  
			};
	        var optBegin = $.extend(true, {onSelect:selectBegin}, opt);
	        var optEnd = $.extend(true, {onSelect:selectEnd}, opt);
			$("#timeBegin").mobiscroll(optBegin);
			$("#timeEnd").mobiscroll(optEnd);
			
//             $( "#timeBegin").datepicker(option);
//             $( "#timeEnd").datepicker(option1);
            $("#aword").bind('click',function(){

                $("#word").show();
                $('.blackDiv').show()
            });
            $("#alang").bind('click',function(){
                $("#lang").show();
                $('.blackDiv').show()
            });
            $("#astart").bind('click',function(){
            	$("#timeBegin").mobiscroll("show");
//                 $("#start").show();
//                 $('.blackDiv').show()
            });
            $("#aend").bind('click',function(){
            	$("#timeEnd").mobiscroll("show");
//                 $("#end").show();
//                 $('.blackDiv').show()
            });
            $("#keyword").bind('change',function(){
                $("#sword").html($(this).val());
//                $(".close").click();
//                $(".done").click();
            });
            $("#language").bind('change',function(){
                $("#slang").html($(this).val());
//                $(".close").click();
            });
            $(".close").bind('click',function(){
                $(this).parent().parent().hide();
                $('.blackDiv').hide()
            });
            $(".done").bind('click',function(){
                $(this).parent().parent().hide();
                $('.blackDiv').hide()
            });
            $("#clear").bind('click',function(){
                $("#sstart").html('');
                $("#send").html('');
                $("#sword").html('');
                $("#slang").html('');
            });
            $("#search").bind('click',function(){
                window.location = "searchResult1.html?key="+$("#sword").html()+'&lang='+$("#slang").html()+"&start="+$("#sstart").html()+'&end='+$("#send").html();
            });
            //获取语言信息
            getLanguageList();
            
        });
      	
        function hmProxy(url, data, callback){
			var prefix = localStorage.localIP;
			//if(!url.startsWith('/')){
			//	prefix += '/';
			//}
			$.ajax({
				type: 'post',
				url: prefix + url + '.json?message=' + JSON.stringify(data),
				dataType: 'json',
				success: callback
			});
		}
        
        function getLanguageList(){
        	var json = {};
	    	hmProxy('addapi/language', json, function(data, textStatus, jqXHR){
	    		data = eval("("+data+")");
	    		if(data && data.ret == 0){
	    			var list = data.data;
	    			var selectHtml = "";
	    			for(var i = 0; i < list.length; i++){
	    				selectHtml += "<option value='"+list[i].id+"' >"+list[i].name+"</option>";
	    			}
	    			$("#language").html(selectHtml);
	    		}
	    	});
        };
    </script>
</head>
<body>
<div class="blackDiv" style="display: none"></div>

<div id="word" class="divShow"  style="display: none">
    <div class="tit01">Keyword</div>
    <div class="formDiv01" style="padding:0;">
<!--         <label for="keyword" class="label"></label> -->
        <input type="text" id="keyword" class="input01">
    </div>
    <div class="content sear_btn" style="padding: 0;">
        <a href="#" class="close"><p class="searchHeight_but1" >Cancel</p></a>
        <a href="#" class="done"><p class="searchHeight_but2" >Done</p></a>
    </div>
</div>

<div id="lang" class="divShow" style="display: none">
    <div class="tit01">Language</div>
    <div class="formDiv01">
        <!--<label for="language" class="label"></label>-->
        <select required name="birthday_year" id="language" class="select01" style="height:auto;">
            <option value="English" >English</option>
            <option value="Chinese" >Chinese</option>
        </select>
    </div>
    <div class="content sear_btn" style="padding: 0;">
        <a href="#" class="close"><p class="searchHeight_but1" >Cancel</p></a>
        <a href="#" class="done"><p class="searchHeight_but2" >Done</p></a>
    </div>
</div>

<div id="start" class="divShow" style="display: none">
    <div class="tit01">Time begin</div>
    <div class="formDiv01">
        <!--<label for="timeBegin" class="label">Time begin:</label>-->
        <!--<input type="text" id="timeBegin" class="input01">-->
        <input type="text" id="timeBegin" class="input01">
    </div>
    <div class="content sear_btn" style="padding: 0;">
        <a href="#" class="close"><p class="searchHeight_but1" >Cancel</p></a>
        <a href="#" class="done"><p class="searchHeight_but2" >Done</p></a>
    </div>
</div>


<div id="end" class="divShow" style="display: none">
    <div class="tit01">Time end</div>
    <div class="formDiv01">
        <!--<label for="timeEnd" class="label">Time begin:</label>-->
        <input type="text" id="timeEnd" class="input01">
    </div>
    <div class="content sear_btn" style="padding: 0;">
        <a href="#" class="close"><p class="searchHeight_but1" >Cancel</p></a>
        <a href="#" class="done"><p class="searchHeight_but2" >Done</p></a>
    </div>
</div>

	<div id="head" style="text-align:center; color:#fff; font-size:1.25rem; padding:3% 0;">
		<div class="head_left" style=" margin:0; padding:0; padding-left:0;float:left; position: absolute; z-index:1000; left:-4%; top:14%; ">
			<a href="searchOne.html" ><img src="images/gongyong_fh.png" style="width:17%"></a>
		</div>
        Advance Search
		<!--<div class="head_title" style=" float:left; position:relative;">
			<h3 style=" line-height:1.0; margin-top:-2%;"></h3>
		</div>	-->
	</div>
    <div class="headB"></div>
	<div id="container" style="float:left; position:relative; width:100%;" >
		<ul class="searchHeight_lis">
			<li><a href="#" id="aword"><img src="images/result/res_one.png"  class="sear_img_spac">Keyword<span><img src="images/result/res_fh.png" ></span><span id="sword">Economic</span></a></li>
			<li><a href="#" id="alang"><img src="images/result/res_two.png" class="sear_img_spac">Language<span><img src="images/result/res_fh.png"></span><span id="slang">English</span></a></li>
			<li><a href="#" id="astart"><img src="images/result/res_three.png" class="sear_img_spac">Time begin<span><img src="images/result/res_fh.png"></span><span id="sstart">Oct 10,2015</span></a></li>
			<li><a href="#" id="aend"><img src="images/result/res_three.png" class="sear_img_spac">Time end<span><img src="images/result/res_fh.png"></span><span id="send">Nov 10,2015</span></a></li>
		</ul>
		<div class="content sear_btn">
			<a href="#" id="clear"><p class="searchHeight_but1" >Clear</p></a>
			<a href="#" id="search"><p class="searchHeight_but2" >Search</p></a>
		</div>
	</div>
   
</body>
</html>